<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class WaterShops extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('water_shops', function (Blueprint $table) {
             $table->engine = 'InnoDB';
             $table->charset = 'utf8mb4';
             $table->collation = 'utf8mb4_unicode_ci';
            // CONTENT
            $table->increments('id')->nullable(false)->comment('');
			$table->integer('water_category_id')->nullable(false)->comment('分类');
			$table->integer('company_id')->nullable(false)->comment('公司编号');
			$table->integer('site_id')->nullable(false)->comment('站点编号');
			$table->string('name', 100)->nullable(false)->comment('商品名称');
			$table->integer('num')->nullable(false)->default(0)->comment('库存');
			$table->string('unit', 30)->nullable(false)->comment('单位');
			$table->integer('creater_uid')->nullable(false)->comment('录入人编号');
			$table->string('creater_name', 50)->nullable(false)->comment('录入人');
			$table->timestamp('created_at')->nullable()->comment('');
			$table->timestamp('updated_at')->nullable()->comment('');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('water_shops');
    }
}
